package com.alexrnl.BetaSeriesFileManager.API.communication;

/**
 * 
 * @author Alex
 */
public class APIParametersKeys {

	/**
	 * The key parameter.
	 */
	public static final String	KEY			= "key";
	/**
	 * The user-agent parameter.
	 */
	public static final String	USER_AGENT	= "user-agent";
	/**
	 * The token parameter (connexion information for the current member).
	 */
	public static final String	TOKEN		= "token";

	/**
	 * The status method.
	 * @return the status method.
	 */
	public static String STATUS () {
		return "status";
	}

	/**
	 * The method from the show category.
	 * @author Alex
	 */
	public static class Shows {
		private final static String	method	= "shows";

		/**
		 * The method for searching shows.
		 * @author Alex
		 */
		public static class Search {
			@SuppressWarnings("hiding")
			private final String		method;
			private static final String	title	= "title";

			/**
			 * Constructor for the show searching method.
			 * @param parentMethod
			 *            the path to the parent method.
			 */
			public Search (final String parentMethod) {
				this.method = parentMethod + "/" + "search";
			}

			@Override
			public String toString () {
				return this.method;
			}

			/**
			 * Alias for the {@link #toString()} method.
			 * @return the path for the method.
			 * @see #toString()
			 */
			public String getMethod () {
				return toString();
			}

			/**
			 * The string to search.
			 * @return the title parameter.
			 */
			public static String TITLE () {
				return title;
			}
		}

		/**
		 * @return the searching show method.
		 */
		public static Search SEARCH () {
			return new Search(method);
		}

		/**
		 * @param showUrl
		 *            the show URL parameter.
		 * @return the method which display the show <code>showUrl</code>.
		 */
		public static String DISPLAY (final String showUrl) {
			return method + "/" + "display" + "/" + showUrl;
		}

		/**
		 * The episodes method.
		 * @author Alex
		 */
		public static class Episodes {
			@SuppressWarnings("hiding")
			private final String		method;
			private final static String	season	= "season";
			private final static String	episode	= "episode";
			private final static String	summary	= "summary";

			/**
			 * Constructor for the episodes method.
			 * @param parentMethod
			 *            the path to the parent method.
			 * @param showURL
			 *            the show URL parameter.
			 */
			public Episodes (final String parentMethod, final String showURL) {
				this.method = parentMethod + "/" + "episodes";
			}

			@Override
			public String toString () {
				return this.method;
			}

			/**
			 * Alias for the {@link #toString()} method.
			 * @return the path for the method.
			 * @see #toString()
			 */
			public String getMethod () {
				return toString();
			}

			/**
			 * The season to return.
			 * @return the season parameter.
			 */
			public static String SEASON () {
				return season;
			}

			/**
			 * The episode to return.
			 * @return the episode parameter.
			 */
			public static String EPISODE () {
				return episode;
			}

			/**
			 * The full summary of the episodes should be return.
			 * @return the summary parameter.
			 */
			public static String SUMMARY () {
				return summary;
			}
		}

		/**
		 * @param showUrl
		 *            the show URL parameter.
		 * @return the episodes method.
		 */
		public static Episodes EPISODES (final String showUrl) {
			return new Episodes(method, showUrl);
		}

		/**
		 * @param showUrl
		 *            the show URL parameter.
		 * @return the method which adds the show <code>showUrl</code> to the member.
		 */
		public static String ADD (final String showUrl) {
			return method + "/" + "add" + "/" + showUrl;
		}

		/**
		 * @param showUrl
		 *            the show URL parameter.
		 * @return the method which removes the show <code>showUrl</code> from the member.
		 */
		public static String REMOVE (final String showUrl) {
			return method + "/" + "remove" + "/" + showUrl;
		}

		/**
		 * The method for recommending shows.
		 * @author Alex
		 */
		public static class Recommend {
			@SuppressWarnings("hiding")
			private final String		method;
			private static final String	friend	= "friend";

			/**
			 * Constructor for the show searching method.
			 * @param parentMethod
			 *            the path to the parent method.
			 */
			public Recommend (final String parentMethod) {
				this.method = parentMethod + "/" + "recommend";
			}

			@Override
			public String toString () {
				return this.method;
			}

			/**
			 * Alias for the {@link #toString()} method.
			 * @return the path for the method.
			 * @see #toString()
			 */
			public String getMethod () {
				return toString();
			}

			/**
			 * The login of the friend.
			 * @return the friend parameter.
			 */
			public static String FRIEND () {
				return friend;
			}
		}

		/**
		 * @return the recommending show method.
		 */
		public static Recommend RECOMMEND () {
			return new Recommend(method);
		}

		/**
		 * @param showUrl
		 *            the show URL parameter.
		 * @return the method which archive the show <code>showUrl</code>.
		 */
		public static String ARCHIVE (final String showUrl) {
			return method + "/" + "archive" + "/" + showUrl;
		}

		/**
		 * @param showUrl
		 *            the show URL parameter.
		 * @return the method which un-archive the show <code>showUrl</code>.
		 */
		public static String UNARCHIVE (final String showUrl) {
			return method + "/" + "unarchive" + "/" + showUrl;
		}

		/**
		 * The method for the characters of the shows.
		 * @author Alex
		 */
		public static class Characters {
			@SuppressWarnings("hiding")
			private final String		method;
			private static final String	summary	= "summary";
			private static final String	id		= "id";

			/**
			 * Constructor for the caracter show method.
			 * @param parentMethod
			 *            the path to the parent method.
			 */
			public Characters (final String parentMethod) {
				this.method = parentMethod + "/" + "characters";
			}

			@Override
			public String toString () {
				return this.method;
			}

			/**
			 * Alias for the {@link #toString()} method.
			 * @return the path for the method.
			 * @see #toString()
			 */
			public String getMethod () {
				return toString();
			}

			/**
			 * The full summary of the characters should be return.
			 * @return the summary parameter.
			 */
			public static String SUMMARY () {
				return summary;
			}

			/**
			 * The id of the character file.
			 * @return the id parameter.
			 */
			public static String ID () {
				return id;
			}
		}

		/**
		 * @return the recommending show method.
		 */
		public static Characters CHARACTERS () {
			return new Characters(method);
		}

	}

	/**
	 * @return the method for the show category.
	 */
	public static Shows SHOWS () {
		return new Shows();
	}

}
